package com.xmtlxx.wms.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.common.tengbo.vo.SmartCabinetPickProVo;
import com.xmtlxx.wms.domain.PickDtl;
import com.xmtlxx.wms.domain.bo.PickDtlBo;
import com.xmtlxx.wms.domain.vo.PickDtlVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmtlxx.wms.domain.bo.VerifyOutProBo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 挑拣任务明细Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface PickDtlMapper extends BaseMapperPlus<PickDtlMapper, PickDtl, PickDtlVo> {
    /**
     * 根据条件分页查询挑拣任务明细
     *
     * @param pickDtl 挑拣任务明细
     * @return Page PickDtl
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "p.create_by"),
//        @DataColumn(key = "deptName", value = "p.dept_id"),
//        @DataColumn(key = "userName", value = "p.create_by")
//    })
    Page<PickDtlVo> selectPagePickDtlList(@Param("page") Page<PickDtl> page,@Param("pickDtl") PickDtlBo pickDtl);

    /**
     * 查询挑拣任务明细列表
     *
     * @param pickDtl 挑拣任务明细
     * @return 挑拣任务明细集合
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "p.create_by"),
//        @DataColumn(key = "deptName", value = "p.dept_id"),
//        @DataColumn(key = "userName", value = "p.create_by")
//    })
    List<PickDtlVo> selectPickDtlList(@Param("pickDtl") PickDtlBo pickDtl);

    PickDtlVo selectPickDtlVoByID(String id);

    void deletePickDtlByPickId(String id);

    /**
     * 获取智能柜拣选财物(出柜)
     * @author hergreen
     * @date 2024/08/23 14:34
     * @param smartCabinetId 智能柜id
     * @return java.util.List<com.xmtlxx.common.tengbo.vo.SmartCabinetPickProVo>
     */
    List<SmartCabinetPickProVo> getSmartCabinetPickPro(String smartCabinetId);

}
